<template>
<div>
    <el-card>
        <div slot="header" class="clearfix">
            <span>搜索关键词【{{word}}】结果如下</span>
            <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
        </div>
        <div v-for="article in ArticleList">
            <list :article=article></list>
        </div>
    </el-card>
</div>
</template>

<script>
import {
    search
} from "../api";

import questionListCell from "../components/content/questionListCell";

export default {
    name: "search",
    components:{
      list :questionListCell
    },
    data() {
        return {
            //接收文章列表
            ArticleList: [
                {
                    id:1,
                    title:"射射射",
                    name:"hello",
                    tagList:[],
                    description:''
                },
                {
                    id:2,
                    title:"射射射",
                    name:"hello",
                    tagList:[],
                    description:''
                }
            ],
            word: ''
        }
    },
    created() {
        this.word = this.$route.query.keyword;

        search(this.word).then(res => {
            console.log(res)
            this.ArticleList=res.data.page.records;
        })
    }
}
</script>

<style scoped>

</style>
